		//修改实习律师信息窗口
		var modifyWin;
		//待修改的实习律师信息form对象
		var modifyPracLawInfo;

		//接收原文件的存储器
		var stores;
		//修改实习律师信息函数
		function modifyPracLawyerInfo(grid,store){
			stores=store;
		var record = grid.getSelectionModel().getSelected();
        if (!record) {
           Ext.MessageBox.alert('修改操作','请选择要修改的一项！');
        } else {
            myFormWin();
                Ext.getCmp("praclawid").setValue(record.get("praclawid"));
            	Ext.getCmp("praclawname").setValue(record.get("praclawname"));
            	Ext.getCmp("birthtime2").setValue(record.get("birthtime"));
            	Ext.getCmp("praclawsex").setValue(record.get("praclawsex"));
            	Ext.getCmp("politicalstatus2").setValue(record.get("politicalstatus"));
            	Ext.getCmp("educationallevel2").setValue(record.get("educationallevel"));
            	Ext.getCmp("graduateschool2").setValue(record.get("graduateschool"));
            	Ext.getCmp("praclawphone").setValue(record.get("praclawphone"));
            	Ext.getCmp("starttime").setValue(record.get("starttime"));
            	Ext.getCmp("endtime").setValue(record.get("endtime"));
            	Ext.getCmp("mpracticeProtocol").setValue(record.get("pracagreement"));
            	Ext.getCmp("identitynumber2").setValue(record.get("identitynumber"));
            	Ext.getCmp("parclawemail").setValue(record.get("parclawemail"));
                Ext.getCmp("practicenumber").setValue(record.get("practicenumber"));
                Ext.getCmp("guideteacher").setValue(record.get("guideteacher"));

                Ext.getCmp("mplFrontOccupation").setValue(record.get("frontoccupation"));
                Ext.getCmp("mplHouseholdAddr").setValue(record.get("householdeaddr"));
                Ext.getCmp("mplArchiveAddr").setValue(record.get("archiveaddr"));
                Ext.getCmp("mplEligibleNumb").setValue(record.get("eligiblenumber"));
        }
		}
		//修改实习律师信息窗口
		var myFormWin = function() {
            modifyWin = new Ext.Window( {
                layout : 'fit',
                width : 800,
                height : 450,
                closeAction : 'hide',
                plain : true,
                title : '修改实习律师信息窗口',
                items : modifyPracLawInfo
            });
        modifyWin.show();
    };

    modifyPracLawInfo = new Ext.FormPanel( {
         collapsible : true,// 是否可以展开
         labelAlign:'right',
         buttonAlign:'center',
        labelWidth : 100,
        frame : true,
        bodyStyle : 'padding:5px 5px 0',
        waitMsgTarget : true,

        defaults : {
            width : 200
        },
        defaultType : 'textfield',

        items : [
        {
        	xtype:'hidden',
            name :'praclawid',
             id :'praclawid'
        },
        {
            fieldLabel : '实习律师姓名',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'praclawname',
             id :'praclawname',
            allowBlank :false
        },
        {
                   fieldLabel :'出生年月',
					id :'birthtime2',
					name :'birthtime2',
					itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
					allowBlank :true
        },

        {
            fieldLabel : '性别',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'praclawsex',
            id:"praclawsex",
            allowBlank : false
        },
        {
            fieldLabel : '政治面貌',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'politicalstatus2',
            id:"politicalstatus2",
            allowBlank : false
        },
        {
            fieldLabel : '文化水平',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'educationallevel2',
            id:"educationallevel2",
            allowBlank : false
        },

         {
            fieldLabel : '毕业院校',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'graduateschool2',
            id:"graduateschool2",
            allowBlank : false
        },
        {
            fieldLabel : '联系方式',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'praclawphone',
            id:"praclawphone",
            allowBlank : false
        },
        {
            fieldLabel : '实习开始时间',
            itemCls:'float-left',//向左浮动
					clearCls:'allow-float',//允许浮动
            name :'starttime',
            id:"starttime",
            allowBlank : false
        },
         {
            fieldLabel : '实习结束时间',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'endtime',
            id:"endtime",
            allowBlank : false
        },

			 {
            fieldLabel : '协议年限',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'practiceProtocol',
            id:"mpracticeProtocol",
            allowBlank : false
        },
         {
            fieldLabel : '身份证号',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'identitynumber2',
            id:"identitynumber2",
            allowBlank : false
        },

         {
            fieldLabel : '邮箱',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'parclawemail',
            id:"parclawemail",
            allowBlank : false
        },
         {
            fieldLabel : '实习证号',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'practicenumber',
            id:"practicenumber",
            allowBlank : false
        },
        {
            fieldLabel : '实习指导老师',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'guideteacher',
            id:"guideteacher",
            allowBlank : false
        },
        {
            fieldLabel : '前职业',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'mplFrontOccupation',
            id:"mplFrontOccupation",
            allowBlank : false
        },
        {
            fieldLabel : '户籍所在地',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'mplHouseholdAddr',
            id:"mplHouseholdAddr",
            allowBlank : false
        },
        {
            fieldLabel : '档案所在地',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'mplArchiveAddr',
            id:"mplArchiveAddr",
            allowBlank : false
        },
        {
            fieldLabel : '资格证号',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'mplEligibleNumb',
            id:"mplEligibleNumb",
            allowBlank : false
        }
        ],

        buttons : [ {
            text : '保存',
            iconCls:'save',
            disabled : false,
            handler : function() {
                if (modifyPracLawInfo.form.isValid()) {
                    modifyPracLawInfo.form.submit( {
                        url : 'ModifyPracLawyerInfo.jsj',
                        success : function(from, action) {
                         Ext.MessageBox.alert('保存成功', '修改律师信息成功！');
                            stores.load( {
                                params : {
                                    start : 0,
                                    limit : 5
                                }
                            });
                            modifyWin.hide();
                        },
                        failure : function(form, action) {
                           Ext.MessageBox.alert('保存失败', '修改律师信息失败！');
                        },
                        waitMsg : '正在保存数据，稍后...'
                    });
                   // dialog.hide();
                } else {
                    Ext.Msg.alert('信息', '请填写完成再提交!');
                }
            }
        }, {
            text : '取消',
            iconCls:'cancel',
            handler : function() {
                modifyWin.hide();
            }
        }]
    });
